﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace TowerDefense
{
    public abstract class GameScreen : DrawableGameComponent
    {
        protected enum BState { HOVER, UP, JUST_RELEASED, DOWN }

        public ContentManager content;
        public ScreenManager screenManager;
        public bool isHidden, isDisabled;
        protected int screenWidth, screenHeight;
       // static protected SpriteFont gameFont, textFont;

        public GameScreen(Microsoft.Xna.Framework.Game game) : base(game)
        {
            this.content = new ContentManager(game.Services, "Content");

            this.screenWidth = Game1.ScreenWidth;
            this.screenHeight = Game1.ScreenHeight;

            Style.gameFont = content.Load<SpriteFont>("gameFont");
            Style.textFont = content.Load<SpriteFont>("textFont");
            game.IsMouseVisible = true;

            //TODO: Verify the below statement for correctness
            this.screenManager =  this.Game.Services.GetService(typeof (ScreenManager)) as ScreenManager;
        }

        public virtual void UnloadContent()
        {
            content.Unload();
        }

        public abstract void LoadContent();

        public abstract void Draw(GameTime gameTime);

        public abstract void Update(GameTime gameTime);

    }
}
